from django.contrib import admin
from .models import Banner,Nav


# Register your models here.


@admin.register(Banner)
class BannerInfoAdmin(admin.ModelAdmin):
    list_display = ['title', 'orders', 'is_show', 'is_delete','image_url','orders']
    list_filter = ['is_show']
    search_fields = ['title','link']

@admin.register(Nav)
class NavModelAdmin(admin.ModelAdmin):
    list_display = ["title", "position", "is_show", "is_site", "link"]
    search_fields = ['title']  # 搜索字段
    list_filter = ['is_show']  # 过滤字段
